// 基于template/src/views/{{appModules}}/{{pages@DEPICKUPVIEW}}/{{spinalCase page.codeName}}-hook.ts.hbs生成
import { QXEvent } from 'qx-util';
import {
	PickupViewActionType,
	PickupViewController,
	IPickupViewAbility,
	IPickupViewControllerParams,
	IParam,
	IViewEvent,
} from '@/core';
import {
	usePickupViewProps,
	usePickupViewBasic,
	usePickupViewControllerParams,
    usePickupViewAction,
} from '@/hooks/view/use-pickup-view';
import { model } from "./ibiz-customer-usr-2-pickup-view-model";

/**
 * 获取输入参数
 *
 * @export
 * @return {*}
 */
export function useProps() {
	return {
		...usePickupViewProps()
	};
}

/**
 * 获取基础数据
 *
 * @export
 * @param {*} props
 * @return {*}
 */
export function useBasic(props: any) {
	return {
		...usePickupViewBasic(model, props)
	};
}

/**
 * 获取行为
 *
 * @export
 */
export function useAction(controller: any) {
	return {
        ...usePickupViewAction(controller)
    }
}

/**
 * 获取控制器
 *
 * @export
 * @param {IParam} props
 * @param {QXEvent<IViewEvent<PickupViewActionType, IPickupViewAbility>>} evt
 * @return {*}
 */
export function useController(
	props: IParam,
	evt: QXEvent<IViewEvent<PickupViewActionType, IPickupViewAbility>>
) {
	const params: IPickupViewControllerParams<
		PickupViewActionType,
		IPickupViewAbility
	> = usePickupViewControllerParams(model, props, evt);
	return new PickupViewController(params);
}